﻿using System;
using System.Collections.Generic;
 
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class per_modify_p : MpageBase
{
    protected Model.CMember cmember = null;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void midifyBtn_Click(object sender, EventArgs e)
    {

        if(loginUserInfo!=null&&loginUserInfo.Id>0){
            cmember = BLL.CMember.GetModel(loginUserInfo.Id);
            if (cmember.zhifuPassword.Equals(BLL.Security.MD5(afterzhipass.Text.Trim())))
            {
                cmember.zhifuPassword = BLL.Security.MD5(newpass.Text.Trim());
                System.Web.HttpContext.Current.Session[BLL.CMember.LoginUserSessionKey] = cmember;
                if (BLL.CMember.Update(cmember) > 0)
                {
                    alertmessageAndGoback("新支付密码修改成功！");
                }
            }
            else
            {
                alertmessageAndGoback("原始支付密码错误！");
            }
        
        }
    }
}